<%inherit file="/index.mako" />
<%def name="title()">Spectacles</%def>
<%
	def print_spectacle(spectacle):
		spec="""
			<div id="spec_list_pag" align="center">
				<p class="spectacles_title"><a href="/spectacles/view/%s">%s</a></p>
				
			</div>
			
		""" % (spectacle.id, spectacle.title)
		return spec
		
	def print_spectacle_list(spectacles):
		spectacle_list = '<p style="color: white;">Liste des Spectacles</p>'
		for spectacle in spectacles:
			spectacle_list = spectacle_list+ """
											<p>
												<a href="/spectacles/view/%s" class="spec_link">%s</a>
											</p>
											 """ % (spectacle.id, spectacle.title)	
		
		return "<div id='spec_list'>%s</div>" % spectacle_list
%>	
<div>
	
		${print_spectacle_list(c.spectacles) | n}
	
	<div style="float: left; width: 680px" align="left">
		%for spectacle in c.spectacles:
			${print_spectacle(spectacle) | n}
		%endfor
	</div>
	<div style="clear: both;"></div>
</div>